<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />		
<title>CarList.com - Register for #{msgs.title}</title> 


<style type="text/css"><!--
/*  body und schrift deffinitionen */
body {
  background-color: #5E7BC2;
  background-image:url('resources/images/background.png');
  font-size: 13px;
  font-family: Arial, SunSans-Regular, Sans-Serif;
  color:#5E7BC2;  
  padding:0;
  margin:0;
}

a { 
color: #5E7BC2;
text-decoration: none; 
}
 

h1 {
font-size: 16px;
text-transform:uppercase;
color: #564b47;
background-color: #5E7BC2;
padding:0px 15px;
margin:0px
}

h2 {
font-size:16px;
padding-top:0px;
text-transform:uppercase;
color: #564b47;
background-color: transparent;
}

.logo { margin: 0px 0; }

p, h2, pre {
margin: 0; 
padding: 5px 20px; 
}

/*  positioning-layers statisch und absolut */

#left {
position: absolute;
left: 0;
width: 20%;
}

#content {
margin: 0 20%;
border: 2px solid #564b47;
border-top: none;
background-color: #ffffff;    
}

#right {
position: absolute;
right: 0;        
width: 220px;

}
table img
{
 vertical-align: bottom;
}
td,th {
  text-align: center;
}
-->


</style>
<!--5E7BC2-->
</head> 

<body>
    <table><td width="30%"></td><td><img src ="resources/images/banner.png" /></td></table>

<h1><table valign="bottom" cellpadding="0" cellspacing="0" height="42px"><td width="20%"></td>
        <td width="90px"><a href="index.xhtml"><font color="white" align="center">home</font></a></td>
        <td width="100px"><a href="search.xhtml"><font color="white" align="center">search</font></a></td>
           <td width="100px"><a href="registration.xhtml"><font color="white" align="center">register</font></a></td>
           <td width="60px"><font color="white"></font></td>
          
                <h:form rendered="#{!userBean.loggedIn}">
                    <td width="700px">
                        <font color="white">User Name:</font><h:inputText value="${userBean.userName}" size="10"/>
                        <font color="white">Password:</font><h:inputSecret value="${userBean.password}" size="10"/>
                        <h:commandButton value="Log In" action="${userBean.loginUser()}"/>
                    </td>
                </h:form>
                <h:form rendered="#{userBean.loggedIn}">
                    <td width="700px">
                        <h:commandLink value="${userBean.userName}" action="user.xhtml" styleClass="link"/>
                    </td>
                </h:form>
           <td width="20%"><font color="white"></font></td>
    
    </table></h1>

<div id="left">
<h2></h2>

</div>

<div id="right">   
<h2></h2> 


</div>

<div id="content">
<h2><h:form>
           <p>
                     <h2>#{msgs.registerCarTrader}</h2>
                    <h:panelGrid columns ="2">
                     <p>#{msgs.firstName} <h:inputText  value="#{userBean.firstName}" required="true" requiredMessage="First Name is required."></h:inputText> </p>
                     <p>#{msgs.lastName} <h:inputText  value="#{userBean.lastName}" required="true" requiredMessage="Last Name is required."></h:inputText> </p>
                     <p>#{msgs.userEmail} <h:inputText  value="#{userBean.email}" required="true" requiredMessage="Email is required."></h:inputText> </p>
                     <p>#{msgs.userEmail2} <h:inputText  value="#{userBean.email2}" required="true" requiredMessage="Email is required."></h:inputText> </p>
                     <p>#{msgs.userName} <h:inputText  value="#{userBean.userName}" required="true" requiredMessage="Username is required."></h:inputText> </p>
                     <p>#{msgs.password} <h:inputSecret value="#{userBean.password}" required="true" requiredMessage="Password is required."></h:inputSecret> </p>
                    </h:panelGrid>
           </p> 
           <p>
               <p><h:commandButton value="#{msgs.registerButton}" styleClass="textArea" action="#{userBean.registerUser()}"></h:commandButton></p>
           </p>
           <h:panelGroup rendered="#{userBean.userNameError}" styleClass="error">
               <t> #{msgs.userNameError}</t>
           </h:panelGroup>
        </h:form>  </h2>



</div>
</body>
</html>
